/**
* @file client_base.h
* @brief tcp客户端
*/
#ifndef TIANYU_COMMON_NET_CLIENT_NET_H_
#define TIANYU_COMMON_NET_CLIENT_NET_H_

#include <stdint.h>
#include <string>

#ifdef _MSC_VER
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#endif

#include "../../3rd/st_asio_wrapper/tcp/client_socket.h"
#include "../../3rd/st_asio_wrapper/ext/tcp.h"
using namespace st_asio_wrapper;

class CProxyClient;

class CClientNet :public single_socket_service< ::ext::tcp::connector>
{
public:
	CClientNet(CProxyClient& proxy_client, service_pump& pump);
	~CClientNet(void);

public:
	bool on_msg(boost::uint_fast64_t id, std::string& msg);
	virtual void on_connect();
private:
	CProxyClient& proxy_client_;
};


#endif
